package cho114366.basic;

public class J16_OOP_Q73V2 {

	public static void main(String[] args) {
		// 상속, 인터페이스, 기본클래스를 이용해서
		// Fan 상태를 출력하는 프로그램 작성
/*		J16MotorFan s=new J16MotorFan(1, true, 1.0, "red");
		System.out.println(s);
*/		J16MotorFan s=new J16MotorFan(J16FanService.fast, true, 1.0, "red");
		System.out.println(s);
		System.out.println(s.getSpeed());
		System.out.println(s.getRedius());
		System.out.println(s.getColor());
		System.out.println(s.toString());
		
		
		
	}// main

}// class

// 인터페이스
interface J16FanService {

	int slow = 1;
	int midum = 2;
	int fast = 3;

}

// 클래스
class J16Fan implements J16FanService {
	/*
	 * private final int slow = 1; private final int midum = 2; private final
	 * int fast = 3;
	 */

	private int speed;
	private boolean on;
	private double redius;
	private String color;

	public J16Fan() {

	}

	public J16Fan(int speed, boolean on, double redius, String color) {
		super();
		this.speed = speed;
		this.on = on;
		this.redius = redius;
		this.color = color;
	}

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	public boolean isOn() {
		return on;
	}

	public void setOn(boolean on) {
		this.on = on;
	}

	public double getRedius() {
		return redius;
	}

	public void setRedius(double redius) {
		this.redius = redius;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	@Override
	public String toString() {
		return "J16Fan [speed=" + speed + ", on=" + on + ", redius=" + redius
				+ ", color=" + color + "]";
	}

}

class J16MotorFan extends J16Fan{
	public J16MotorFan(int s, boolean o, double r, String c) {
		super(s,o,r,c);
	}
	
}






// 숙제 .................메소드를 하나 추가로 정의하여 출력되겠끔해라









